<?php
/**
 * 兼容第三方插件补丁文件
 * @来自第三方接口文件
 */
require  $this->plugin_root .'/alisms/sms.php';
defined('BY_JYA') or exit('error');
list($mobile,$content,$mid)=$arguments;
$setting=$this->get_setting();
if(!$setting['appkey'] || !$setting['secret']){
	return error('参数错误');
}
$appkey=$setting['appkey'];
$secret=$setting['secret'];
$sign=$setting['sign'];
$content=json_encode($content);
$return=sendsmsnew($appkey,$secret,$mobile,$sign,$mid,$content);
$return=(array)$return;
if($return['Code']=='OK'){
	$status=1;
}else{
	$status=0;
}
$pluginname=$this->from_plugin;
if(!$pluginname){
	$pluginname='core';
}
$data=array(
'uniacid'=>$_SESSION['uniacid'],
'plugin'=>$pluginname,
'mb_id'=>$mid,
'status'=>$status,
'remake'=>$return['Message'],
'createtime'=>time(),
'mobile'=>$mobile,
);
$this->insert('dayu_log',$data);
return $status;
